package cc.mcggdd.leah.boot.stock.service;

import cc.mcggdd.leah.boot.stock.model.entity.StockReceivable;
import cc.mcggdd.leah.boot.stock.model.form.StockReceivableForm;
import cc.mcggdd.leah.boot.stock.model.query.StockReceivableQuery;
import cc.mcggdd.leah.boot.stock.model.vo.StockReceivableVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * 应收服务类
 *
 * @author 
 * @since 2025-02-08 17:52
 */
public interface StockReceivableService extends IService<StockReceivable> {

    /**
     *应收分页列表
     *
     * @return
     */
    IPage<StockReceivableVO> getStockReceivablePage(StockReceivableQuery queryParams);

    /**
     * 获取应收表单数据
     *
     * @param id 应收ID
     * @return
     */
     StockReceivableForm getStockReceivableFormData(Long id);

    /**
     * 新增应收
     *
     * @param formData 应收表单对象
     * @return
     */
    boolean saveStockReceivable(StockReceivableForm formData);

    /**
     * 修改应收
     *
     * @param id   应收ID
     * @param formData 应收表单对象
     * @return
     */
    boolean updateStockReceivable(Long id, StockReceivableForm formData);

    /**
     * 删除应收
     *
     * @param ids 应收ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteStockReceivables(String ids);

    /**
     * 获取应收总金额
     * @return
     */
    BigDecimal getStockReceivableTotalAmount(String status);
}
